package com.yusheng.tr.multi.service.impl;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.yusheng.utils.CommonExcelVo;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

@Slf4j
@NoArgsConstructor
public class CommonExcelListener extends AnalysisEventListener<CommonExcelVo> {

    private final List<CommonExcelVo> voList = new ArrayList<>();

    @Override
    public void invoke(CommonExcelVo commonExcelVo, AnalysisContext analysisContext) {
        voList.add(commonExcelVo);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {;
    }

    public List<CommonExcelVo> finalAll(){
        return voList;
    }
}
